package top.sheen.platform.gateway.repository;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
import top.sheen.platform.gateway.entity.WechatFansInfo;

import java.util.Optional;

/**
 * 微信粉丝信息资源访问接口
 *
 * @author sheen dong
 * @since 2020/8/13 11:08 上午
 **/
@Repository
public interface WechatFansInfoRepository extends MongoRepository<WechatFansInfo, String> {

    /**
     * 根据openid查询粉丝数据
     * @param openid openid
     * @return 查询的粉丝数据
     */
    Optional<WechatFansInfo> findFirstByOpenid(String openid);
}